<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
    String path = request.getContextPath();
    String clientIp = Tools.getLocalIp(request);
%>
<!DOCTYPE html>
<html>
<head>
    <title>会员信息</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- 指定以IE8的方式来渲染 -->
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
    <link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
    <link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
    <link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
    <script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
    <script src="<%=path %>/js/pages/manage/supplierCheckBox.js"></script>
    <script>
        var kid = ${sessionScope.user.id};
        var path = "<%=path%>";
        var clientIp = "<%=clientIp%>";
    </script>
</head>
<body>
    <!-- 查询 -->
    <div id = "searchPanel"	class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false" >
        <div id="checkInfo">
            <div id="">
                <fieldset  style="width: 250px">
                    <legend style="color: blue">主制部门</legend>
                    <table>
                        <tr>
                            <td>
                                <input type="checkbox" value="非会员" id="test1" name="searchName"><span id="checkSupplier">118显示控产品</span>
                            </td>
                            <td>
                                <input type="checkbox" value="hy00001" name="searchName"><span id="checkSupplier2">128仪表传感器产品</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="checkbox" value="hy00001" name="searchName"><span >148机械制造</span>
                            </td>
                            <td>
                                <input type="checkbox" value="hy00001" name="searchName"><span >168特种制造</span>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </div>
            <div id="">
                <fieldset  style="width: 200px">
                    <legend style="color: blue">产品性质</legend>
                    <table>
                        <tr>
                            <td>
                                <input type="checkbox" value=""  name=""><span>9/批生产</span>
                            </td>
                            <td>
                                <input type="checkbox" value="" name=""><span>1/科研产品</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="checkbox" value="" name=""><span >2/科研小批</span>
                            </td>
                            <td>
                                <input type="checkbox" value="" name=""><span >6/备板备件</span>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </div>
            <div id="">
                <fieldset  style="width: 220px">
                    <legend style="color: blue">计划要素</legend>
                    <table>
                        <tr>
                            <td>
                                <span style="color: blue">计划员</span>
                            </td>
                            <td>
                                <select style="width: 120px;" ><option>倪佳蔚</option></select>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <select>
                                    <option>2017</option>
                                    <option>2018</option>
                                </select>
                                <span>年</span>
                            </td>
                            <td>
                                <select>
                                    <option>1</option>
                                    <option>2</option>
                                    <option>3</option>
                                    <option>4</option>
                                    <option>5</option>
                                    <option>6</option>
                                    <option>7</option>
                                    <option>8</option>
                                    <option>9</option>
                                    <option>10</option>
                                    <option>11</option>
                                    <option>12</option>
                                </select>
                                <span>月</span>
                            </td>
                        </tr>
                    </table>



                </fieldset>
            </div>
        </div>
        <table id="searchTable" style="DISPLAY: none;">
            <tr>
                <div>
                    <td>名&nbsp;&nbsp;&nbsp;&nbsp;称：</td>
                    <td>
                        <input type="text" name="searchSupplier" id="searchSupplier"  style="width:100px;"/>
                    </td>
                    <td>&nbsp;</td>
                    <td>手机号码：</td>
                    <td>
                        <input type="text" name="searchTelephone" id="searchTelephone"  style="width:100px;"/>
                    </td>
                    <td>&nbsp;</td>
                    <td>联系电话：</td>
                    <td>
                        <input type="text" name="searchPhonenum" id="searchPhonenum"  style="width:100px;"/>
                    </td>
                    <%--联系人--%>
                    <td>联系人：</td>
                    <td>
                        <input type="text" name="" id="searchContacts"  style="width:100px;"/>
                    </td>
                    <%--状态--%>
                    <td>状态：</td>
                    <td>
                        <input type="text" name="" id="searchEnable"  style="width:100px;"/>
                    </td>
                    <td>&nbsp;</td>
                    <td id="searchDescLabel">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</td>
                    <td>
                        <input type="text" name="searchDesc" id="searchDesc"  style="width:100px;"/>
                    </td>
                    <td>&nbsp;</td>
                </div>
                <td>
                    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
                    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
                </td>
            </tr>
        </table>
    </div>
    <!-- 数据显示table -->
    <div id = "tablePanel"	class="easyui-panel" style="padding:1px;top:300px;" title="工单信息显示Test" iconCls="icon-list" collapsible="true" closable="false">
        <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
    </div>

    <div id="roleDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
         closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
        <form id="roleFM" method="post"  novalidate>
            <table>
                <tr>
                    <td><label id="nameLabel">角色名称&nbsp;&nbsp;</label></td>
                    <td style="padding:5px"><input name="name" id="name" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/></td>
                </tr>
            </table>
            <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
        </form>
    </div>
    <div id="dlg-buttons">
        <a href="javascript:void(0)" id="saveRole" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
        <a href="javascript:void(0)" id="cancelRole" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#roleDlg').dialog('close')">取消</a>
    </div>
    <%----%>
    <script>
        $(function () {
            //设置搜索信息样式
            searchStyle();
            initTableData();
        })

        //设置搜索信息样式
        function searchStyle() {
            $("#checkInfo div").css("float", "left");
            $("#checkInfo fieldset").css("border-color", "#f6f6f6");
        }

        //初始化表格数据
        function initTableData()
        {
            $('#tableData').datagrid({
                //title:'角色列表',
                //iconCls:'icon-save',
                //width:700,
                height:heightInfo,
                nowrap: false,
                rownumbers: false,
                //动画效果
                animate:false,
                //选中单行
                singleSelect : true,
                collapsible:false,
                //selectOnCheck:false,
                //fitColumns:true,
                //单击行是否选中
                //checkOnSelect : false,
                url:'<%=path %>/role/findBy.action?pageSize=' + initPageSize,
                pagination: true,
                //交替出现背景
                striped : true,
                //loadFilter: pagerFilter,
                pageSize: initPageSize,
                pageList: initPageNum,
                columns:[[
                    { field: 'Id',width:35,align:"center",checkbox:true},
                    { title: '角色名称',field: 'Name',width:200},
                    { title: '操作',field: 'op',align:"center",width:130,formatter:function(value,rec)
                    {
                        var str = '';
                        var rowInfo = rec.Id + 'AaBb' + rec.Name;
                        if(1 == value)
                        {
                            str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editRole(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editRole(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;';
                            str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteRole('+ rec.Id +');"/>&nbsp;<a onclick="deleteRole('+ rec.Id +');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;';
                        }
                        return str;
                    }
                    }
                ]],
                toolbar:[
                    {
                        id:'addRole',
                        text:'增加',
                        iconCls:'icon-add',
                        handler:function()
                        {
                            addRole();
                        }
                    },
                    {
                        id:'deleteRole',
                        text:'删除',
                        iconCls:'icon-remove',
                        handler:function()
                        {
                            batDeleteRole();
                        }
                    }
                ],
                onLoadError:function()
                {
                    $.messager.alert('页面加载提示','页面加载异常，请稍后再试！','error');
                    return;
                }
            });
        }

    </script>
</body>
</html>